// home页面的异步请求
import request from './index'

// 获取 banner
export function getBannerPc() {
  return request({
    method: "GET",
    url: "/banner",
    params: {
      type: 0
    }
  })
}

// 获取 推荐歌单
export function getTuijianGedan(limit = 30) {
  return request({
    method: "GET",
    url: "/personalized",
    params: {
      limit
    }
  })
}

// 获取 新歌速递
export function getNewSongSuDi(type = 0) {
  return request({
    method: "GET",
    url: "/top/song",
    params: {
      type
    }
  })
}

// 获取新碟上架
export function getNewAlbum() {
  return request({
    method: "GET",
    url: "/album/newest",
  })
}


// 获取  数字专辑的新碟上架
export function getShuziAlbum() {
  return request({
    method: "GET",
    url: "/album/list?limit=10",
  })
}

// 获取 排行榜 详情
export function getPaiHangBangDetail(id = 19723756) {
  // 默认获取飙升榜的数据
  return request({
    method: "GET",
    url: "/playlist/detail",
    params: {
      id,
    }
  })
}

// 获取 精选MV
export function getMv() {

  return request({
    method: "GET",
    url: "/top/mv?limit=10",
  })
}


// 获取 歌手

export function getMusicePerson() {
  return request({
    method: "GET",
    url: "/top/artists?offset=0&limit=10"
  })
}